<template>
    <div id="container">
        <div id="viewDiv"></div>
        <el-main style="position:absolute;top:0px;left:0px">
            <div style="width:100%">
            </div>
        </el-main>
    </div>
</template>

<script setup>
import * as 天地图 from '../天地图'
import {onMounted,ref,computed} from 'vue'
import Map from '@arcgis/core/Map'
import FeatureLayer from '@arcgis/core/layers/FeatureLayer'
import SceneView from '@arcgis/core/views/SceneView'
var map,view,要素图层
onMounted(()=>{
    要素图层=new FeatureLayer({
        url:"https://ws8575.club/web/rest/services/Hosted/要素图层发布测试_前端渲染测试_3857/FeatureServer/0",
        renderer:{
            type:"simple",
            symbol:{
                type:"point-3d",
                symbolLayers: [{ 
                    type: "object",
                    resource: { primitive: "cylinder"},
                    material: {  color: [219, 53, 53, 0.8] },
                    width: 100,
                    height:300
                }]
            }
        },
        labelingInfo:{
            labelExpressionInfo:{
                expression:"$feature.name"
            },
            symbol:{
                type:"text",
                color:[219, 53, 53],
                haloColor:[255,255,255],
                haloSize:0.5
            },
            minScale:50000
        }
    })
    map=new Map({
        basemap:"satellite",
        ground:"world-elevation",
        layers: [要素图层]
    })
    view = new SceneView({
        map: map,
        container: "viewDiv",
        camera:{
            position:{
                type:"point",
                longitude:120.4,
                latitude:36.1,
                z:4000
            },
            heading:0,
            tilt:60
        }
    })
    view.ui.remove(["zoom","attribution","compass","navigation-toggle"])
})//onMounted()结尾
</script>

<style scoped>
    #viewDiv,#container{
    height:100%;width:100%;padding:0;margin:0;
    }
    span{
        white-space: pre-line;
        color:rgb(100,100,100)
    }
</style>
  